<template>
  <div>
    <p>新闻分类</p>
    <p>{{ num }}</p>
    <button @click="add">+1</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 1,
    };
  },
  methods: {
    add() {
      this.num++;
    },
  },
};
</script>

<style  scoped lang="scss">
</style>